#!/bin/bash
. /shell/utils.sh

pid=$(ps aux | grep $1 | grep prod | awk '{print $2}')

if [ "$pid" != "" ]; then
    echo "程序已启动，无需启动"
else
    real_path=$(get_path)
    nohup $real_path/$1 --env=prod >$real_path/output.log 2>&1 &

    ps aux | grep $1
    if [ "$pid" != "" ]; then
        echo "启动成功"
        echo "$pid"
    fi
fi